/*
** xfucntions_2.c for  in /u/all/caille_c/cu/rendu/c/minishell1
** 
** Made by carole cailleux
** Login   <caille_c@epitech.net>
** 
** Started on  Sun Jan  3 15:22:34 2010 carole cailleux
** Last update Wed Mar 17 16:33:28 2010 carole cailleux
*/

#include <stdlib.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/uio.h>
#include <unistd.h>
#include "client.h"

int             kill(pid_t pid, int sig);

void		my_perror(char *str)
{
  write(2, str, my_strlen(str));
  exit(EXIT_FAILURE);
}

int		xkill(pid_t pid, int sig)
{
  int		a;

  a = kill(pid, sig);
  if (a == -1)
    my_perror("Kill failure.\n");
  return (a);
}

ssize_t		xwrite(int d, void *buf, size_t nbytes)
{
  int		a;

  a = write(d, buf, nbytes);
  if (a == -1)
    my_perror("Write failure.\n");
  return (a);
}
